package com.linln.modules.modules.reply.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import com.fasterxml.jackson.annotation.JsonFormat;

import lombok.Data;

/**
 * @author hct
 * @date 2019/10/11
 */
@Data
@Entity
@Table(name="sys_reply")
@EntityListeners(AuditingEntityListener.class)
public class Reply implements Serializable {
    // 主键ID
    @Id
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    private Long id;
    // 类型
    private Integer type;
    // 类型id
    private Long typeid;
    // 内容
    private String content;
    // 消息状态
    private String status;
    
    private String area;
    //赞的数量
    private Integer zannum;
    //回复数量
    private Integer replynum;
        
    // 创建时间
    @CreatedDate
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createDate;
    // 消息发送人
    private Long memberid;
    
    private String nickname;
    
    private String head;
    // 更新时间
    @LastModifiedDate
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateDate;
}